Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/nukable permission check for resources #696

Merged
merged 2 commits into from
May 13, 2024

Conversation

james03160927
Copy link
Contributor

Description

Fixes #000.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.
  • Attention Grunts - if this PR adds support for a new resource, ensure the nuke_sandbox and nuke_phxdevops jobs in .circleci/config.yml have been updated with appropriate exclusions (either directly in the job or via the .circleci/nuke_config.yml file) to prevent nuking IAM roles, groups, resources, etc that are important for the test accounts.

Release Notes (draft)

Added / Removed / Updated [X].

Migration Guide

@james03160927 james03160927 force-pushed the feature/nukable-permission-check-for-resources branch from d29ba70 to d09622f Compare May 7, 2024 22:46
@@ -162,6 +172,12 @@ func (ngw *NatGateways) areAllNatGatewaysDeleted(identifiers []*string) (bool, e
func (ngw *NatGateways) deleteAsync(wg *sync.WaitGroup, errChan chan error, ngwID *string) {
defer wg.Done()

if nukable, err := ngw.IsNukable(awsgo.StringValue(ngwID)); !nukable {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like value of err is not checked, same thing in other places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified the code. It's not an actual error. It should be clearer with the renaming of the variable.

@denis256
Copy link
Member

--> windows/386 error: exit status 1
Stderr: # github.com/gruntwork-io/cloud-nuke/aws/resources
aws/resources/eip.go:43:18: undefined: awsgo
aws/resources/eip.go:74:35: undefined: awsgo
aws/resources/eip.go:75:52: undefined: awsgo

@james03160927
Copy link
Contributor Author

--> windows/386 error: exit status 1
Stderr: # github.com/gruntwork-io/cloud-nuke/aws/resources
aws/resources/eip.go:43:18: undefined: awsgo
aws/resources/eip.go:74:35: undefined: awsgo
aws/resources/eip.go:75:52: undefined: awsgo

There seems to be issue with running tests for circleCI because there are too many at this point. Need to fix that in separate PR.

@james03160927 james03160927 merged commit d53472e into master May 13, 2024
3 checks passed
@james03160927 james03160927 deleted the feature/nukable-permission-check-for-resources branch May 13, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants